package spring.aop;

import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;

public class MyBeforeAdvice extends MyAdvice{

    public MyBeforeAdvice(Object target, Method method) {
        super(target, method);
        System.out.println("我被创建了！");
    }

    @Override
    public Object execute(MyChain chain,Object[] args ) throws InvocationTargetException, IllegalAccessException {
        method.invoke(target,args);

        return chain.proceed();
    }
}
